package com.zhiwei.fast.fragments.models

import com.blankj.utilcode.util.GsonUtils
import com.zhiwei.fast.R
import com.zhiwei.fast.data.MainItemModel
import com.zhiwei.most.base.viewmodel.BaseViewModel
import com.zhiwei.most.data.SingleLiveData

/**
 * Create by zhiweizhu on 2022/2/25
 */
class MainFragmentViewModel: BaseViewModel() {

    private val _itemList: SingleLiveData<MutableList<MainItemModel>> by lazy(LazyThreadSafetyMode.NONE){
        SingleLiveData()
    }

    fun getItemListLiveData(): SingleLiveData<MutableList<MainItemModel>>{
        return _itemList
    }


    fun loadData() {
        _itemList.value = mutableListOf(
            MainItemModel(
                R.id.action_mainFragment_to_sweepstakesFragmentDemo,
                "抽奖演示"
            ),
            MainItemModel(
                R.id.action_mainFragment_to_progressRingFragment,
                "进度条Demo"
            ),
            MainItemModel(
                R.id.action_mainFragment_to_arcFragment,
                "ArcDemo"
            ),
            MainItemModel(
                R.id.action_mainFragment_to_bleScantFragment,
                "蓝牙扫描"
            ),
            MainItemModel(
                R.id.action_mainFragment_to_dialogFragmentSimple,
                "弹框Demo"
            ),
            MainItemModel(
                0,
                "核心工具_6"
            ),
            MainItemModel(
                0,
                "核心工具_7"
            ),
            MainItemModel(
                0,
                "核心工具_8"
            ),
            MainItemModel(
                0,
                "核心工具_9"
            ),
        )
    }
}
